#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <signal.h>
#include <string.h>
#include <stdbool.h>
#include <dlfcn.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h> 
#include "virtual-machine/ram.c"
#include "gex4.h"
#include "virtual-machine/vvm.c"
#include "handlers.h"
#include "virtual-machine/parseargs.c"
#include "virtual-machine/load.c"

int main(int argc, char* argv[])
{
	sigInit();
	FILE* bin;	
	if(parseArgs(argc, argv) == -1)
		return 1;
	init_vm(0xFFFF); // Create will initilize the viper virtual machine
	if(!useGex)
		loadBinary(argv[1]);
	else
		loadGEX(argv[1]);
	dumpRam();
	runCode(0);
	return 0;

}
